<template>
<div>
    <h1>车辆历史通行记录详情查看</h1>
             <div class="white">
        <div class="test01">
         <span class="demonstration">车辆：</span>
          <el-select class="select" v-model="value1" size="medium" placeholder="请选择车辆">
            <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
            </el-option>
          </el-select>
        </div>
        <div class="test02">
            <div class="block">
            <span class="demonstration">时间范围：</span>
             <el-date-picker
             v-model="value2"
             type="daterange"
             align="right"
            unlink-panels
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :picker-options="pickerOptions">
            </el-date-picker>
         </div>
        </div>
        <h1>总览</h1>
      <div>
        <el-table
    :data="tableData"
    border
    style="width: 100%">
    <el-table-column
      fixed
      prop="date"
      label="收费时间"
      width="150">
    </el-table-column>
    <el-table-column
      prop="way"
      label="途径路段"
      width="200">
    </el-table-column>
    <el-table-column
      prop="lincense"
      label="所属车牌号"
      width="200">
    </el-table-column>
     <el-table-column
      prop="color"
      label="车辆颜色"
      width="200">
    </el-table-column>
    <el-table-column
      prop="type"
      label="车种"
      width="150">
    </el-table-column>
    <el-table-column
      prop="model"
      label="车型"
      width="150">
    </el-table-column>
    <el-table-column
      prop="id"
      label="关联sOBU的设备编号"
      width="200">
    </el-table-column>
     <el-table-column

      prop="sfee"
      label="收费总额"
      width="200">
    </el-table-column>
     <el-table-column

      prop="operation"
      label="操作"
      width="200">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="info" size="mini  " plain>查看具体收费详情</el-button>
      </template>
    </el-table-column>
  </el-table>
      </div>
    </div>
      </div>
</template>

<script>
  export default {
        data() {
      return {
         tableData: [{
          date: '2016-05-06',
          way: '京沪高速',
          lincense: '赣NBzzzzz1',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '5',
          sfee: '1120',
        }, {
          date: '2016-04-09',
          way: '虎门高速',
          lincense: '赣NBzzzzz2',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '3',
          sfee: '789',
        }, {
          date: '2016-03-06',
          way: '京沪高速',
          lincense: '赣NBzzzzz1',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '3',
          sfee: '112',
        }, {
          date: '2016-03-06',
          way: '京沪高速',
          lincense: '赣NBzzzzz5',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '1',
          sfee: '2325',
        }, {
          date: '2016-02-03',
          way: '京沪高速',
          lincense: '赣NBzzzzz3',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '8',
          sfee: '89',
        }, {
          date: '2015-04-28',
          way: '京沪高速',
          lincense: '赣NBzzzzz3',
          color:'蓝色',
          type: '乘用车',
          model: '轿车',
          id: '4',
          sfee: '1833',
        },

        ],
         options: [{
          value: '选项1',
          label: '兰博基尼'
        }, {
          value: '选项2',
          label: '劳斯莱斯',
        }, {
          value: '选项3',
          label: '凯迪拉克'
        }, {
          value: '选项4',
          label: '五菱宏光'
        }, {
          value: '选项5',
          label: '法拉利'
        }],
         pickerOptions: {
          shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
        value1:'',
        value2: ''

        }
        },
    methods: {

    }
  }

</script>
